﻿using VSTalk.Engine.Core.ExtElement;

using agsXMPP.protocol.client;

namespace VSTalk.Engine.Core.XmppUtils
{
    public class MessageUtil
    {
        public static bool IsContentMessage(Message msg)
        {
            //A "content message" -- that is, a message stanza whose primary meaning is contained in 
            //standard messaging content such as the XMPP <body/> or any other properly-namespaced child 
            //element(s) other than those defined for chat state notifications in this specification.
            return !string.IsNullOrEmpty(msg.Body) || msg.HasTag(XamlBody.TAG);
        }
    }
}